<{include file="admin/session.html"}>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="skin/admin/style/base.css" type="text/css" />
<link rel="stylesheet" href="skin/admin/style/main.css" type="text/css" />
<link rel="alternate stylesheet" type="text/css" href="skin/admin/Upimg/1024.css" />
<style type="text/css" media="all">
@import "skin/admin/Upimg/thickbox.css";
</style>
<script type="text/javascript" src="skin/admin/js/jquery.js"></script>
<script type="text/javascript" src="skin/admin/js/Validform.js"></script>
<script type="text/javascript">
$(function(){
	$(".registerform:last").Validform({
		tiptype:2,
		ajaxPost:true,
		callback:function(data){
			if(data.status=="y"){
				setTimeout(function(){
					$.Hidemsg(); //公用方法关闭信息提示框;
				},2000);
			}
		}
	});
})
function delit(obj) {
$.get('<{spUrl c=others a=delmess}>','mid='+obj,function (msg) { 
if ('1'==msg) { 
$('#t'+obj).remove(); 
} else { 
alert("删除失败"); 
} 
}); 
}
</script>
<script src="skin/admin/Upimg/thickbox-compressed.js" type="text/javascript"></script>
<script src="skin/admin/Upimg/global.js" type="text/javascript"></script>
<title>管理系统</title>
</head>
<body>
<div class="rbox">
  <div class="ur_here">
    <div class="path fl" align="left">其他设置<span>-留言管理</span></div>
</div>  
  <div class="add_box" style="height:25px;"><span class="action fr"><a href="<{spUrl c=others a=getbookcode height=300 width=550 modal=true}>" class="thickbox">获取留言调用代码</a></span><span class="action fr">
  <script language="javascript">
  	function seeme(objx) {
		var abc="<{spUrl c=others a=submitbook height=450 width=600 modal=true}>&gps="+objx;
		document.getElementById("huoqu").alt=abc;
	}
  </script>
  产品组：
      <select name="gp" id="gp" onchange="seeme(this.value);">
	    <option value="99">- 请先选择产品组 -</option>
        <{foreach from=$group item=two}>
		<option value="<{$two.id}>"><{$two.gname}></option>
		<{/foreach}>
    </select>
    <input type="button" name="Submit" id="huoqu" value="获取留言发表代码" title="获取留言发表代码" class="thickbox" alt="" />
  </span></div>
  
  <div class="add_box"><strong>按产品组筛选：</strong><{foreach from=$group item=two}><a href="<{spUrl c=others a=guestbook gid=$two.id}>"><{$two.gname}></a>&nbsp;&nbsp;&nbsp;<{/foreach}></div>
  <!--  内容列表   -->
  <div class="rbox_list">
<form name="pageForm" id="pageForm" action="<{spUrl c=sysuser a=sysUserForPage}>" method="post">
<input type="hidden" id="pageNo" name="pageNo" value=""/>  
    <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center">
      <tr align="center" bgcolor="#FAFAF1" height="25">
	    <th width="7%">编号</th>
        <th width="13%">所属产品组</th>
        <th width="42%">留言内容</th>
		<th width="18%">留言时间</th>
		<th width="12%">是否回复</th>
		<th width="8%">操作</th>
      </tr>
      <{if $results|@count gt 0}>
      <{foreach from=$results item=one}>
      <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="28" id="t<{$one.id}>">
	  	<td><{$one.id}></td>
        <td><{$one.0}></td>
        <td><b><{$one.mess}></b></td>
		<td><b><{$one.addtime}></b></td>
		<td><{if $one.remess==""}><font color="red">未回复</font><{else}><font color="green">已回复</font><{/if}></td>
		<td><div class="act"><a href="#" onclick="ifjump=confirm('是否确定删除此条记录至回收站?');if(!ifjump){return false;} else {delit(<{$one.id}>);}">删除</a><a href="<{spUrl c=others a=remess height=280 width=400 modal=true id=$one.id}>" class="thickbox">回复</a></div></td>
      </tr>
      <{/foreach}>
      <{else}>
      <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';"height="28" >
      	<td colspan="8" align="center"><span style="color:#666">暂无数据...</span></td>
      </tr>
      <{/if}>
      <tr bgcolor="#FAFAF1">
        <td height="28" colspan="12" align="middle">
<!--传统分页开始-->
<{if $pager}> 
共有<{$pager.total_count}>条记录，当前<{$pager.current_page}>/<{$pager.total_page}>页：
<{if $pager.current_page != $pager.first_page}> 
<a href="<{spUrl c=others a=guestbook gid=$gid page=$pager.first_page}>">首页</a> | 
<a href="<{spUrl c=others a=guestbook gid=$gid page=$pager.prev_page}>">上一页</a> | 
<{/if}> 
<{foreach from=$pager.all_pages item=thepage}> 
<{if $thepage >= $pager.current_page-4 and $thepage <= $pager.current_page+4}> 
<{if $thepage != $pager.current_page}> 
<a href="<{spUrl c=others a=guestbook gid=$gid page=$thepage}>"><{$thepage}></a> 
<{else}> 
<span style="width:20px;padding:0 1px;"><{$thepage}></span> 
<{/if}> 
<{elseif $thepage <= 10 and $thepage >= $pager.current_page-4}>
<{if $thepage != $pager.current_page}> 
<a href="<{spUrl c=others a=guestbook gid=$gid page=$thepage}>"><{$thepage}></a> 
<{else}> 
<span style="width:20px;padding:0 1px;"><{$thepage}></span> 
<{/if}> 
<{elseif $thepage >= $pager.last_page-9 and $thepage <= $pager.current_page-4}>
<{if $thepage != $pager.current_page}> 
<a href="<{spUrl c=others a=guestbook gid=$gid page=$thepage}>"><{$thepage}></a> 
<{else}> 
<span style="width:20px;padding:0 1px;"><{$thepage}></span> 
<{/if}> 
<{else}>
<{/if}>
<{/foreach}> 
<{if $pager.current_page != $pager.last_page}> 
| 
<a href="<{spUrl c=others a=guestbook gid=$gid page=$pager.next_page}>">下一页</a> | 
<a href="<{spUrl c=others a=guestbook gid=$gid page=$pager.last_page}>">尾页</a> 
<{/if}> 
<{/if}>  
<!--传统分页结束-->        </td>
      </tr>
    </table>
</form>    
  </div>
</div>
</body>
</html>
